//
//  CAAnimation+SpringAnimation.h
//  SpringAnimation
//
//  Created by Hanjun Hong on 15/9/9.
//  Copyright (c) 2015年 Anyfish. All rights reserved.
//

#import <QuartzCore/QuartzCore.h>

@interface CAAnimation (SpringAnimation)

/**
 *  弹性动画
 *
 *  @param duration     动画时间
 *  @param delay        延迟时间
 *  @param dampingRatio 衰减比例(0~1)
 *  @param velocity     速度(0~1)
 *  @param fromValue    动画起值
 *  @param toValue      动画结束
 *  @param keyPath      CAKeyframeAnimation keyPath
 *
 *  @return CAKeyframeAnimation
 */
+ (CAKeyframeAnimation *)springAnimationDuration:(NSTimeInterval)duration
                                           delay:(NSTimeInterval)delay
                                         damping:(CGFloat)dampingRatio
                                        velocity:(CGFloat)velocity
                                       fromValue:(id)fromValue
                                         toValue:(id)toValue
                                      forKeyPath:(NSString *)keyPath;
@end
